Skip to content

feat(s3): add copy method to S3Template#1656

Open
abilng wants to merge 1 commit into
awspring:mainfrom
abilng:feat/s3-copy
Open

feat(s3): add copy method to S3Template#1656
abilng wants to merge 1 commit into
awspring:mainfrom
abilng:feat/s3-copy

Conversation

@abilng

@abilng abilng commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

📢 Type of change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring

📜 Description

Allow copying objects between buckets/keys via S3Operations without dropping down to S3Client.

Closes #1157

📝 Checklist

  • I reviewed submitted code
  • I added tests to verify changes
  • All tests passing
  • No breaking changes

🔮 Next steps

Allow copying objects between buckets/keys via S3Operations
without dropping down to S3Client.

Closes awspring#1157

@MatejNedic MatejNedic left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @abilng ,

Thanks on PR, few changes needed.

}

void apply(CopyObjectRequest.Builder builder) {
builder.metadataDirective(MetadataDirective.REPLACE);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be configurable as well. Someone might want to override only if no value is set so .COPY


void apply(CopyObjectRequest.Builder builder) {
builder.metadataDirective(MetadataDirective.REPLACE);
if (acl != null) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

User ObjectProvider and set to builder instead of many ifs

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Many ifs is consistent with other parts of this class. I think we can keep it in this PR and refactor independently.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add copy to S3Template

3 participants